package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOsdome {
    public static void main(String[] args) throws IOException {
        String name="刘尚";
        int age = 55;
        String gender = "男";
        String[] otherInfo = {"牛逼","很好"};
        Person per = new Person(name,age,gender,otherInfo);
        FileOutputStream fos=new FileOutputStream("person.obj");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        oos.writeObject(per);
        System.out.println("OK");
        oos.close();
    }
}
